VT-d: only scan secondary functions on multi-function devices
authorKeir Fraser <keir@xen.org>
Fri, 29 Oct 2010 17:06:17 +0000 (18:06 +0100)
committerKeir Fraser <keir@xen.org>
Fri, 29 Oct 2010 17:06:17 +0000 (18:06 +0100)
Signed-off-by: Jan Beulich <jbeulich@novell.com>
xen/drivers/passthrough/pci.c

index d6d833142bc6842512a11e9eeb52561cb61edf64..0a159804f1cb392be218024dafd4f7f68e5f0a5d 100644 (file)
@@ -445,6 +445,10 @@ int __init scan_pci_devices(void)
                         spin_unlock(&pcidevs_lock);
                         return -EINVAL;
                 }
+
+                if ( !func && !(pci_conf_read8(bus, dev, func,
+                                               PCI_HEADER_TYPE) & 0x80) )
+                    break;
             }
         }
     }